package com.eorchis.module.trainingplan.ui.commond;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.beanutils.BeanUtils;
import org.codehaus.jackson.map.ObjectMapper;
import com.eorchis.core.page.commond.SortInfoBean;
import com.eorchis.core.ui.commond.impl.BasePageQueryCommond;
import com.eorchis.core.ui.commond.IQueryCommond;

/**
 * Title: TrainingPlanCommond<br>
 * Description: 培训计划Commond<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author RongSL
 * @createDate 2016-07-12
 * @version $Revision$
 */
public class TrainingPlanQueryCommond extends BasePageQueryCommond implements IQueryCommond{

	private String[] searchPlanIds;	
	/**
	 * 查询条件：ID
	 */
	private String searchPlanId;
	private String searchApplyNum;
	private String []searchApplyNums;
	private Integer searchIssuedState;
	private Integer searchPublishState;
	private Integer searchAuditState;
	private Integer searchActiveState;
	private String deptName;
//	private Date searchBeginDate;
//	private Date searchEndDate;
	private String searchVersion;//版本号
	private String searchUndertakeName;//承办部委
	private String searchUndertakeID;//承办部委ID
	private Integer searchApplyPlan;//查看计划名额 1:新计划 2:老计划
	private String []deptIds;//报名单位ID
	private String opinions;//意见们
	private Integer []cityPlanCounts;//计划县级人数
	private Integer []countyPlanCounts;//计划市级人数
	private Integer []planCounts;//计划总人数
	private String []deptNames;//单位名称
	private String  applyNum;//计划编号
	private Integer searchPlanNum;//计划人数
	private String searchClassName;//班级名称
	private String []applyNums;//计划编号集合
	private String coursesNum;//班级编号
	private String className;//专题名称
	private String classObjective;//办班目的
	private String classValues;//培训内容
	private Integer planDay;//学制
	private String jointName;//合办部委
	private String jointId;//合办部委
	private String undertakeName;//承办部委
	private String undertakeId;//承办部委
	private String planDate;//计划时间
	private String trainingObject;//调训对象
	private String rejectReason;//驳回原因
	private String trainingAddress;//培训地点
	private String linkMan;//联系人
	private String linkMode;//联系方式
	private String fax;//传真
	private Integer searchFeedbackState;//反馈状态
	private String searchDeptId;//部门编号
	private Integer searchSelectState;
	private String startPlanDateNewStr;//计划开始时间
	private String endPlanDateNewStr;//计划结束时间
	
	public String[] getSearchPlanIds() {
		return searchPlanIds;
	}
	public void setSearchPlanIds(String[] searchPlanIds) {
		this.searchPlanIds = searchPlanIds;
	}

	public String getSearchPlanId() {
		return searchPlanId;
	}
	public void setSearchPlanId(String searchPlanId) {
		this.searchPlanId = searchPlanId;
	}

	/**
	 * EXT 页面排序
	 */
	private SortInfoBean sortInfo = null;
	
	/**
	 * 获取排序内容
	 * @return
	 * @author HuangS
	 * @date Jul 20, 2012
	 */
	public SortInfoBean getSortInfos() {
		return this.sortInfo;
	}
	/**
	 * 设置排序内容
	 * 
	 * @param sort
	 * @author HuangS
	 * @date Jul 25, 2012
	 */
	@SuppressWarnings("unchecked")
	public void setSort(String sort) {
		if (sort != null && !"".equals(sort)) {
			sortInfo = new SortInfoBean();
			ObjectMapper objectMapper = new ObjectMapper();
			try {
				List<LinkedHashMap<String, Object>> list = objectMapper.readValue(sort, List.class);
				for (int i = 0; i < list.size(); i++) {
					Map<String, Object> map = list.get(i);
					Set<String> set = map.keySet();
					for (Iterator<String> it = set.iterator(); it.hasNext();) {
						String key = it.next();
						BeanUtils.setProperty(sortInfo, key, map.get(key));
					}
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
	public String getSearchApplyNum() {
		return searchApplyNum;
	}
	public void setSearchApplyNum(String searchApplyNum) {
		this.searchApplyNum = searchApplyNum;
	}
	public String getSearchClassName() {
		return searchClassName;
	}
	public void setSearchClassName(String searchClassName) {
		this.searchClassName = searchClassName;
	}
	public Integer getSearchIssuedState() {
		return searchIssuedState;
	}
	public void setSearchIssuedState(Integer searchIssuedState) {
		this.searchIssuedState = searchIssuedState;
	}
	public Integer getSearchPublishState() {
		return searchPublishState;
	}
	public void setSearchPublishState(Integer searchPublishState) {
		this.searchPublishState = searchPublishState;
	}
	public Integer getSearchAuditState() {
		return searchAuditState;
	}
	public void setSearchAuditState(Integer searchAuditState) {
		this.searchAuditState = searchAuditState;
	}
//	public Date getSearchBeginDate() {
//		return searchBeginDate;
//	}
//	public void setSearchBeginDate(Date searchBeginDate) {
//		this.searchBeginDate = searchBeginDate;
//	}
//	public Date getSearchEndDate() {
//		return searchEndDate;
//	}
//	public void setSearchEndDate(Date searchEndDate) {
//		this.searchEndDate = searchEndDate;
//	}
	public String getRejectReason() {
		return rejectReason;
	}
	public void setRejectReason(String rejectReason) {
		this.rejectReason = rejectReason;
	}
	public String getSearchVersion() {
		return searchVersion;
	}
	public void setSearchVersion(String searchVersion) {
		this.searchVersion = searchVersion;
	}
	public String getSearchUndertakeName() {
		return searchUndertakeName;
	}
	public void setSearchUndertakeName(String searchUndertakeName) {
		this.searchUndertakeName = searchUndertakeName;
	}
	public Integer getSearchActiveState() {
		return searchActiveState;
	}
	public void setSearchActiveState(Integer searchActiveState) {
		this.searchActiveState = searchActiveState;
	}
	public Integer getSearchApplyPlan() {
		return searchApplyPlan;
	}
	public void setSearchApplyPlan(Integer searchApplyPlan) {
		this.searchApplyPlan = searchApplyPlan;
	}
	public String[] getDeptIds() {
		return deptIds;
	}
	public void setDeptIds(String[] deptIds) {
		this.deptIds = deptIds;
	}
	public Integer[] getCityPlanCounts() {
		return cityPlanCounts;
	}
	public void setCityPlanCounts(Integer[] cityPlanCounts) {
		this.cityPlanCounts = cityPlanCounts;
	}
	public Integer[] getCountyPlanCounts() {
		return countyPlanCounts;
	}
	public void setCountyPlanCounts(Integer[] countyPlanCounts) {
		this.countyPlanCounts = countyPlanCounts;
	}
	public Integer[] getPlanCounts() {
		return planCounts;
	}
	public void setPlanCounts(Integer[] planCounts) {
		this.planCounts = planCounts;
	}
	public String [] getDeptNames() {
		return deptNames;
	}
	public void setDeptNames(String [] deptNames) {
		this.deptNames = deptNames;
	}
	public String getApplyNum() {
		return applyNum;
	}
	public void setApplyNum(String applyNum) {
		this.applyNum = applyNum;
	}
	public Integer getSearchPlanNum() {
		return searchPlanNum;
	}
	public void setSearchPlanNum(Integer searchPlanNum) {
		this.searchPlanNum = searchPlanNum;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public String getClassObjective() {
		return classObjective;
	}
	public void setClassObjective(String classObjective) {
		this.classObjective = classObjective;
	}
	public String getClassValues() {
		return classValues;
	}
	public void setClassValues(String classValues) {
		this.classValues = classValues;
	}
	public Integer getPlanDay() {
		return planDay;
	}
	public void setPlanDay(Integer planDay) {
		this.planDay = planDay;
	}
	public String getJointName() {
		return jointName;
	}
	public void setJointName(String jointName) {
		this.jointName = jointName;
	}
	public String getUndertakeName() {
		return undertakeName;
	}
	public void setUndertakeName(String undertakeName) {
		this.undertakeName = undertakeName;
	}
	public String getPlanDate() {
		return planDate;
	}
	public void setPlanDate(String planDate) {
		this.planDate = planDate;
	}
	public String getTrainingObject() {
		return trainingObject;
	}
	public void setTrainingObject(String trainingObject) {
		this.trainingObject = trainingObject;
	}
	public String getTrainingAddress() {
		return trainingAddress;
	}
	public void setTrainingAddress(String trainingAddress) {
		this.trainingAddress = trainingAddress;
	}
	public String getLinkMan() {
		return linkMan;
	}
	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}
	public String getLinkMode() {
		return linkMode;
	}
	public void setLinkMode(String linkMode) {
		this.linkMode = linkMode;
	}
	public Integer getSearchFeedbackState() {
		return searchFeedbackState;
	}
	public void setSearchFeedbackState(Integer searchFeedbackState) {
		this.searchFeedbackState = searchFeedbackState;
	}
	public String getSearchDeptId() {
		return searchDeptId;
	}
	public void setSearchDeptId(String searchDeptId) {
		this.searchDeptId = searchDeptId;
	}
	public Integer getSearchSelectState() {
		return searchSelectState;
	}
	public void setSearchSelectState(Integer searchSelectState) {
		this.searchSelectState = searchSelectState;
	}
	public String [] getApplyNums() {
		return applyNums;
	}
	public void setApplyNums(String [] applyNums) {
		this.applyNums = applyNums;
	}
	public String getJointId() {
		return jointId;
	}
	public void setJointId(String jointId) {
		this.jointId = jointId;
	}
	public String getUndertakeId() {
		return undertakeId;
	}
	public void setUndertakeId(String undertakeId) {
		this.undertakeId = undertakeId;
	}
	public String getSearchUndertakeID() {
		return searchUndertakeID;
	}
	public void setSearchUndertakeID(String searchUndertakeID) {
		this.searchUndertakeID = searchUndertakeID;
	}
	public String getCoursesNum() {
		return coursesNum;
	}
	public void setCoursesNum(String coursesNum) {
		this.coursesNum = coursesNum;
	}
	public String [] getSearchApplyNums() {
		return searchApplyNums;
	}
	public void setSearchApplyNums(String [] searchApplyNums) {
		this.searchApplyNums = searchApplyNums;
	}
	public String getDeptName() {
		return deptName;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public String getOpinions() {
		return opinions;
	}
	public void setOpinions(String opinions) {
		this.opinions = opinions;
	}
	public String getStartPlanDateNewStr() {
		return startPlanDateNewStr;
	}
	public void setStartPlanDateNewStr(String startPlanDateNewStr) {
		this.startPlanDateNewStr = startPlanDateNewStr;
	}
	public String getEndPlanDateNewStr() {
		return endPlanDateNewStr;
	}
	public void setEndPlanDateNewStr(String endPlanDateNewStr) {
		this.endPlanDateNewStr = endPlanDateNewStr;
	}

}
